<template>
  <div>
    <div class="boxClass">
      <el-form :inline="true" label-width="110px">
        <el-row>
          <el-col :span="12">
            <el-form-item label="姓名：">
              <el-input v-model="form.name" class="inputEl"></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="身份证号码：">
              <el-input v-model="form.card" class="inputEl"></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="贷款金额：">
              <el-input v-model="form.money" class="inputEl"></el-input>
            </el-form-item>
            <span class="unit">万元</span>
          </el-col>
          <el-col :span="12">
            <el-form-item label="期限：">
              <el-input v-model="form.year" class="inputEl"></el-input>
            </el-form-item>
            <span class="unit">年</span>
          </el-col>
          <el-col :span="12">
            <el-form-item label="截止时间：">
              <el-date-picker
                v-model="form.endDate"
                type="date"
                placeholder="选择日期" value-format="yyyy-MM-dd">
              </el-date-picker>
              <!--              <el-input v-model="form.endDate"  class="inputEl"></el-input>-->
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="实现债券费用：">
              <el-input v-model="form.debtFee" class="inputEl"></el-input>
            </el-form-item>
            <span class="unit">元</span>
          </el-col>
        </el-row>
      </el-form>
      <div class="indexBox">
        <el-button type="primary" @click="downloadForm">下载</el-button>
      </div>
    </div>
  </div>
</template>

<script>
import { getRepay } from "../../assets/js/api";
import { downloadFormTemp } from "../../assets/js/utlis";

export default {
  name: "compensationInfoCheck",
  props: ["orderNumber"],
  data() {
    return {
      form: {}
    };
  },
  mounted() {
    this.getRepaymentSchedule();
  },
  methods: {
    //获取还款表信息
    getRepaymentSchedule() {
      getRepay({
        orderNumber: this.orderNumber
      }).then(res => {
        this.form = res.data;
      });
    },
    //下载
    downloadForm() {
      downloadFormTemp(
        'POST',
        '/business/compensatory/downloadRepayApplication',
        this.form,
        this.form.name,
        '.docx');

    },
  }
}
;
</script>

<style scoped>

.unit {
  font-size: 14px;
  color: #333333;
  display: inline-block;
  margin-top: 10px;
}

.indexBox {
  margin-top: 20px;
  text-align: center;
}


</style>